static char *opt_color = NULL;
static char *opt_zoom = NULL;
static char *opt_wpt_type = NULL;
+static char *opt_radius = NULL;
+
static short output_type_num = 0;
static short opt_zoom_num = 0;
static long opt_color_num = 0;
static short wpt_type_num = 0;
static short last_read_type = 0;
+static double radius = 0.0;
static long serial=10000;
static long rtserial=1;
"red", ARGTYPE_STRING },
{"zoom", &opt_zoom, "Zoom level to reduce points",
NULL, ARGTYPE_INT },
- {"wpt_type", &opt_wpt_type, "Waypoint type (marker,text,mapnote)",
+ {"wpt_type", &opt_wpt_type,
+ "Waypoint type (marker,text,mapnote,circle)",
"", ARGTYPE_STRING },
+ {"radius", &opt_radius, "Radius for circles",
+ NULL, ARGTYPE_STRING },
{0, 0, 0, 0 }
};
unsigned char create_zoom;
unsigned char visible_zoom;
short unk5;
- double radius;
+ double radius; /* in km */
char *name;
char *fontname;
GUID guid;
static an1_waypoint_record *Alloc_AN1_Waypoint( );
void Destroy_AN1_Waypoint( void *vwpt ) {
+
an1_waypoint_record *wpt = (an1_waypoint_record *)vwpt;
xfree( wpt->name );
xfree( wpt->fontname );
an1_waypoint_record *rec;
int local;
format_specific_data *fs = NULL;
+ waypoint *wpt2 = (waypoint *)(void *)wpt;
fs = fs_chain_find( wpt->fs, FS_AN1W );
-
if ( fs ) {
rec = (an1_waypoint_record *)fs;
xfree( rec->name );
rec->type = wpt_type_num;
rec->unk2 = 3;
rec->unk3 = 18561;
- rec->radius = 528;
+ rec->radius = radius;
rec->fillcolor = opt_color_num;
rec->fillflags = 3;
+ if ( wpt_type_num == 5 ) rec->fillflags = 0x8200;
rec->height = -50;
rec->width = 20;
rec->fontname = xstrdup( "Arial" );
an1_line_record *rec;
int local;
format_specific_data *fs = NULL;
+ route_head *rte2 = (route_head *)(void *)rte;
fs = fs_chain_find( rte->fs, FS_AN1L );
an1_vertex_record *rec;
int local;
format_specific_data *fs = NULL;
+ waypoint *wpt2 = (waypoint *)(void *)wpt;
fs = fs_chain_find( wpt->fs, FS_AN1V );
wpt_type_num = 1; /* marker */
return;
}
- if ((output_type[0] & 0xf0) == 0x30) {
+ if ((opt_wpt_type[0] & 0xf0) == 0x30) {
wpt_type_num = atoi( opt_wpt_type );
}
else {
else if ( !case_ignore_strcmp( opt_wpt_type, "mapnote" )) {
wpt_type_num = 6;
}
+ else if ( !case_ignore_strcmp( opt_wpt_type, "circle" )) {
+ wpt_type_num = 5;
+ }
else {
fatal( MYNAME ": wpt_type must be "
- "marker, text, or mapnote\n" );
+ "marker, text, mapnote, or circle\n" );
}
}
}
if ( opt_zoom ) {
opt_zoom_num = atoi(opt_zoom);
}
+ radius = .1609344; /* 1/10 mi */
+ if ( opt_radius ) {
+ radius = atof(opt_radius);
+ if ( !strchr(opt_radius,'k') && !strchr(opt_radius,'K')) {
+ radius *= 5280*12*2.54/100000;
+ }
+ }
}
static void
of the 16 common color names from the Cascading Style Sheets
specification.i</para>
<para>The "wpt_type" option specifies how to represent point data
-in the draw file. Valid waypoint types are "marker", "text", and "mapnote".
-The default is "marker". </para>
+in the draw file. Valid waypoint types are "marker", "text", "mapnote",
+and "circle". The default is "marker". </para>
+ <para>If the waypoint type is "circle", the "radius" option specifies
+the radius of the circles. By default, this is in miles, but it may be
+specified in kilometers by adding a 'k'. The default radius is 1/10 mile.
+</para>
<para>The "zoom" option specifies at what zoom level Street
Atlas will begin showing reduced versions of your symbols. The default
is 10. Setting zoom to 0 will disable this feature. Setting it to